﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="TGVR.Manager.Login" %>
<%@ Register TagPrefix="UC1" TagName="LoginForm" Src="~/UserControls/Template/SystemUser/LoginForm.ascx" %>
<%@ Register TagPrefix="UC2" TagName="MessageBox" Src="~/UserControls/Template/MessageBox/MessageBox.ascx" %>

<!DOCTYPE html>
<html lang="en-us" id="extr-page">
<head>
    <meta charset="utf-8">
    <title>Đăng nhập hệ thống concung.com</title>
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <!-- #CSS Links -->
    <!-- Basic Styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="App_Themes/SmartAdmin/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" media="screen" href="App_Themes/SmartAdmin/css/font-awesome.min.css">

    <!-- SmartAdmin Styles : Please note (smartadmin-production.css) was created using LESS variables -->
    <link rel="stylesheet" type="text/css" media="screen" href="App_Themes/SmartAdmin/css/smartadmin-production.min.css">

    <!-- SmartAdmin RTL Support is under construction
			 This RTL CSS will be released in version 1.5
		<link rel="stylesheet" type="text/css" media="screen" href="App_Themes/SmartAdmin/css/smartadmin-rtl.min.css"> -->

    <!-- We recommend you use "your_style.css" to override SmartAdmin
		     specific styles this will also ensure you retrain your customization with each SmartAdmin update.-->
    <link rel="stylesheet" type="text/css" media="screen" href="App_Themes/SmartAdmin/css/your_style.css">

    <!-- #FAVICONS -->
    <link rel="shortcut icon" href="App_Themes/SmartAdmin/img/favicon/favicon.ico" type="image/x-icon">
    <link rel="icon" href="App_Themes/SmartAdmin/img/favicon/favicon.ico" type="image/x-icon">

    <!-- #GOOGLE FONT -->
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,300,400,700">

    <!-- #APP SCREEN / ICONS -->
    <!-- Specifying a Webpage Icon for Web Clip 
			 Ref: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html -->
    <link rel="apple-touch-icon" href="App_Themes/SmartAdmin/img/splash/sptouch-icon-iphone.png">
    <link rel="apple-touch-icon" sizes="76x76" href="App_Themes/SmartAdmin/img/splash/touch-icon-ipad.png">
    <link rel="apple-touch-icon" sizes="120x120" href="App_Themes/SmartAdmin/img/splash/touch-icon-iphone-retina.png">
    <link rel="apple-touch-icon" sizes="152x152" href="App_Themes/SmartAdmin/img/splash/touch-icon-ipad-retina.png">

    <!-- iOS web-app metas : hides Safari UI Components and Changes Status Bar Appearance -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!-- Startup image for web apps -->
    <link rel="apple-touch-startup-image" href="App_Themes/SmartAdmin/img/splash/ipad-landscape.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)">
    <link rel="apple-touch-startup-image" href="App_Themes/SmartAdmin/img/splash/ipad-portrait.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)">
    <link rel="apple-touch-startup-image" href="App_Themes/SmartAdmin/img/splash/iphone.png" media="screen and (max-device-width: 320px)">
</head>

<body class="animated fadeInDown">

    <header id="header">

        <div id="logo-group">
            <span id="logo">
                <img src="App_Themes/SmartAdmin/img/logo.png" alt="SmartAdmin">
            </span>
        </div>

    </header>

    <div id="main" role="main">

        <!-- MAIN CONTENT -->
        <div id="content" class="container">

            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-5 col-lg-4">
                    &nbsp;
                </div>
                <div class="col-xs-12 col-sm-12 col-md-5 col-lg-4">
                    <div class="well no-padding">
                        <form id="loginform" class="smart-form client-form" runat="server">
                            <telerik:RadScriptManager ID="myScriptManager" runat="server">
                            </telerik:RadScriptManager>
                            <UC1:LoginForm ID="LoginForm1" runat="server" />
                            <UC2:MessageBox ID="MessageBox1" runat="server" />
                        </form>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <!--================================================== -->

    <!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)
		<script src="js/plugin/pace/pace.min.js"></script>-->

    <!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
    <script> if (!window.jQuery) { document.write('<script src="js/libs/jquery-2.0.2.min.js"><\/script>'); } </script>

    <!-- JS TOUCH : include this plugin for mobile drag / drop touch events 		
		<script src="js/plugin/jquery-touch/jquery.ui.touch-punch.min.js"></script> -->

    <!-- JQUERY VALIDATE -->
    <script src="js/plugin/jquery-validate/jquery.validate.min.js"></script>

    <!--[if IE 8]>
			
			<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>
			
		<![endif]-->

    <script type="text/javascript">

        $(function () {
            // Validation
            $("#loginform").validate({
                // Rules for form validation
                rules: {
                    LoginForm1$txtUserName: {
                        required: true
                    },
                    LoginForm1$txtPassword: {
                        required: true
                    }
                },

                // Messages for form validation
                messages: {
                    LoginForm1$txtUserName: {
                        required: 'Vui lòng nhập mã nhân viên'
                    },
                    LoginForm1$txtPassword: {
                        required: 'Vui lòng nhập mật khẩu'
                    }
                },

                // Do not change code below
                errorPlacement: function (error, element) {
                    error.insertAfter(element.parent());
                }
            });
        });

        $(document).keypress(function (e) {
            var enterPress = returnEnterPress(e);
            if (enterPress) {
                __doPostBack('<%= LoginForm1.FindControl("btnLogin").UniqueID %>', "");
            }
        });

        function returnEnterPress(e) {
            var keynum;
            if (window.event) {
                keynum = e.keyCode;
            }
            else if (e.which) {
                keynum = e.which;
            }
            else {
                keynum = 0;
            }
            if (keynum == 13) {
                return true;
            }
            else {
                return false;
            }
        }
    </script>
</body>
</html>
